Skip to content

fix: Still complete parentheses & method call arguments if there are existing parentheses, but they are after a newline #19763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2025

Conversation

ChayimFriedman2
Copy link
Contributor

@ChayimFriedman2 ChayimFriedman2 commented May 8, 2025

Fixes #19762.

This has always bothered me (especially because I tend to write () at the end of unfinished blocks, because the compiler's error marking the whole block red is very annoying), but I guess I needed someone else to complain about it to go and fix this.

…ing parentheses, but they are after a newline
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 8, 2025
@Veykril
Copy link
Member

Veykril commented May 8, 2025

Can we apply this for

path_ctx.has_call_parens = it.syntax().parent().is_some_and(|it| ast::CallExpr::can_cast(it.kind()));
and
path_ctx.has_call_parens = it.syntax().parent().is_some_and(|it| ast::CallExpr::can_cast(it.kind()));
as well?

@ChayimFriedman2
Copy link
Contributor Author

I mean... I did just that?

@Veykril
Copy link
Member

Veykril commented May 8, 2025

Oh I'm blind 🤦

@Veykril Veykril added this pull request to the merge queue May 8, 2025
Merged via the queue into rust-lang:master with commit 0551bde May 8, 2025
14 checks passed
@ChayimFriedman2 ChayimFriedman2 deleted the ws-completions branch May 8, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complete function calls without considering parentheses for next line
3 participants